-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
fix(custom-element): prevent injecting child styles if shadowRoot is false #12769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-ssr
@vue/compiler-sfc
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
""" WalkthroughThe change updates the custom element style injection logic in the renderer to check if the shadowRoot property is explicitly set to false before injecting child component styles. Additionally, a new test verifies that no style injection occurs when shadowRoot is disabled via the custom element API. Changes
Sequence Diagram(s)sequenceDiagram
participant App as App
participant Renderer as Renderer
participant CustomElement as CustomElement (VueElement)
participant ShadowRoot as ShadowRoot
App->>Renderer: Mount custom element
Renderer->>CustomElement: Check shadowRoot property
alt shadowRoot !== false
Renderer->>CustomElement: Call _injectChildStyle(type)
CustomElement->>ShadowRoot: Inject styles
else shadowRoot === false
Renderer-->>CustomElement: Skip style injection
end
Assessment against linked issues
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
close #12630
Summary by CodeRabbit
Bug Fixes
Tests